//
//  PostSectionHeaderView.h
//  BaseProject
//
//  Created by 王洋 on 2020/12/10.
//  Copyright © 2020 王洋. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CommonPostModel.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, PostSectionHeaderActionType) {
    
    PostSectionHeaderActionType_userIcon,
    //img
    PostSectionHeaderActionType_image,
    
    PostSectionHeaderActionType_theme,
    //eva
    PostSectionHeaderActionType_eva,
    //thumb
    PostSectionHeaderActionType_thumb
};

@interface PostSectionHeaderView : UITableViewHeaderFooterView

@property (weak, nonatomic) IBOutlet UIImageView *userIcon;

@property (weak, nonatomic) IBOutlet UILabel *userNameLab;

@property (weak, nonatomic) IBOutlet UILabel *postTimeLab;

@property (weak, nonatomic) IBOutlet UILabel *postContentLab;

//文本高度
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *postContentHeight;
//图片高度
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imageContentHeight;

@property (weak, nonatomic) IBOutlet UIImageView *contentImg1;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *contentImg1Scale;


@property (weak, nonatomic) IBOutlet UIImageView *contentImg2;

@property (weak, nonatomic) IBOutlet UIImageView *contentImg3;
@property (weak, nonatomic) IBOutlet UIView *contentImg3View;
@property (weak, nonatomic) IBOutlet UILabel *contentImg3Lab;



@property (weak, nonatomic) IBOutlet UIButton *postTagBtn;

@property (weak, nonatomic) IBOutlet UIButton *postEvaBtn;

@property (weak, nonatomic) IBOutlet UIButton *postThumbBtn;


@property (nonatomic, copy) void(^PostSectionHeaderViewBlock)(PostSectionHeaderActionType type, NSInteger index);



+(CGFloat)calculateHWithModel:(CommonPostModel *)model;



- (void)fillWithModel:(CommonPostModel *)model;

@end

NS_ASSUME_NONNULL_END
